package com.ygqh.baby.service;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.PreSaleRemind;
import com.ygqh.baby.po.BiSkuSale;
import com.ygqh.baby.po.WdtQybOrder;
import com.ygqh.baby.po.WdtQybOrderDetail;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface WdtQybOrderService {

    List<WdtQybOrder> find();

    int findCount();

    WdtQybOrder findById(Long id);

    WdtQybOrder findByTradeId(Long tradeId);

    int save(WdtQybOrder wdtQybOrder);

    int update(WdtQybOrder wdtQybOrder);

    int saveOrUpdate(WdtQybOrder wdtQybOrder);

    ResultSet<WdtQybOrder> search(QueryInfo queryInfo, String q);

    int addBatch(List<WdtQybOrder> tradeList);

    Boolean isExist(Long tradeId);

    Boolean isExist(String srcTid);

    Boolean isDetailExist(String srcOid, String sprcNo);

    Boolean isDetailExist(Integer recId);

    int addDetailBatch(List<WdtQybOrderDetail> detailExistList);

    int updateDetailBatch(List<WdtQybOrderDetail> detailExistList);

    List<PreSaleRemind> findSaleCountBySku(List<String> skuList);

    List<BiSkuSale> statisticalSkuSaleCount(QueryInfo queryInfo, Date startDate, Date endDate, String shopNo, String productCode);

    List<WdtQybOrderDetail> findDetailListAfterId(Long startId, String... excludeShopNo);

    List<WdtQybOrderDetail> findDetailListByTime(Date startTime, Date endTime, String... shopNo);

    String getShopName(String shopNo);

    List<Map<String, Object>> finSalesReportBySku(Date startTime, Date endTime);
}
